package com.genius.util.ControllerHelper;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

public class Helper {

    public static String  getUserName(HttpServletRequest request){
        return (String) request.getAttribute("username");
    }

    public static String getUserId(HttpServletRequest request){
        return (String) request.getAttribute("uid");
    }

    public static String checkFormFiled(Map<String,String> formFiled, String filed){
        if(formFiled.containsKey(filed)){
            return formFiled.get(filed);
        }
        return null;
    }
}
